//
//  ViewController.swift
//  BCTimeTableDemo
//
//  Created by Sebarina Xu on 6/8/16.
//  Copyright © 2016 bocai. All rights reserved.
//

import UIKit
import BCTimeTable

class ViewController: UIViewController {
    var calendarView : CalendarView?
    var collectionView : WeekTimeTableView?

    override func viewDidLoad() {
        super.viewDidLoad()
        // Do any additional setup after loading the view, typically from a nib.
        view.backgroundColor = UIColor.whiteColor()
        calendarView = CalendarView(frame: CGRectMake(30, 64, view.frame.width-30, 70), appearanceDelegate: nil, menuDelegate: nil)
        view.addSubview(calendarView!)
        
        
        collectionView = WeekTimeTableView(frame: CGRectMake(0, 134, view.frame.width, view.frame.height - 134))
        collectionView?.appearanceDelegate = self
        view.addSubview(collectionView!)
    }
    
    override func viewDidLayoutSubviews() {
        calendarView?.commonInit()
        collectionView.scrollTo
    }


}

extension ViewController : WeekTimeAppearanceDelegate {
    func weekTimeTableTimeWidth() -> CGFloat {
        return 30
    }
}

